// Official theme for Tranquilpeak
// Default code block
pre > code {
    background: map-get($highlight, 'background');
    color:      map-get($highlight-colors, night-rider);
}

// allow for horizontal scrolling of code blocks
pre > code.codeblock {
    overflow-x: auto;
}

// Default inline code
code {
    background-color: map-get($highlight, 'background');
}

// Tabbed code block tab
.codeblock--tabbed figcaption .tab.active {
    background: map-get($colors, 'primary');
    color:      white;
}

// Highlight code block
figure.highlight,
.codeblock {
    background: map-get($highlight, 'background');
    color:      map-get($highlight-colors, night-rider);

    figcaption {
        background: map-get($highlight, 'background');
        color:      #999999;
    }
    .gutter {
        background:         map-get($highlight, 'background');
        border-right-color: #e6e6e6;

        .line {
            color: #aaaaaa;
        }
    }

    // Highlight code coloration
    // General
    .comment {
        color: map-get($highlight-colors, pewter);
    }
    .string {
        color: map-get($highlight-colors, egyptian-blue);
    }
    .keyword {
        color: map-get($highlight-colors, cardinal);
    }
    // ApacheConf
    &.apacheconf .code {
        .common,
        .nomarkup,
        .attribute,
        .variable,
        .cbracket,
        .keyword {
            color: map-get($highlight-colors, bondi-blue);
        }
        .sqbracket {
            color: map-get($highlight-colors, persimmon);
        }
        .section,
        .tag {
            color: map-get($highlight-colors, asparagus);
        }
    }
    // Bash
    &.bash .code {
        .shebang {
            color: map-get($highlight-colors, pewter);
        }
        .literal,
        .built_in {
            color: map-get($highlight-colors, bondi-blue);
        }
        .variable {
            color: map-get($highlight-colors, night-rider);
        }
        .title {
            color: map-get($highlight-colors, scampi);
        }
    }
    // coffescript
    &.coffeescript .code {
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .literal,
        .built_in,
        .number {
            color: map-get($highlight-colors, bondi-blue);
        }
        .reserved,
        .attribute {
            color: map-get($highlight-colors, bahama-blue);
        }
        .subst,
        .regexp,
        .attribute {
            color: map-get($highlight-colors, persimmon);
        }
    }
    // C/C++
    &.cpp .code,
    &.c .code {
        .preprocessor {
            color: map-get($highlight-colors, persimmon);
        }
        .meta-keyword {
            color: map-get($highlight-colors, cardinal);
        }
        .title  {
            color: map-get($highlight-colors, scampi);
        }
        .number,
        .built_in {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // Clojure
    &.clj .code {
        .builtin-name {
            color: map-get($highlight-colors, persimmon);
        }
        .name {
            color: map-get($highlight-colors, scampi);
        }
        .number {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // C#
    &.cs .code {
        .preprocessor,
        .preprocessor .keyword {
            color: map-get($highlight-colors, night-rider);
        }
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .number,
        .built_in {
            color: map-get($highlight-colors, bondi-blue);
        }
        .xmlDocTag,
        .doctag {
            color: map-get($highlight-colors, asparagus);
        }
    }
    // CSS
    &.css .code {
        .at_rule,
        .important,
        .meta {
            color: map-get($highlight-colors, cardinal);
        }
        .attribute,
        .hexcolor,
        .number,
        .function {
            color: map-get($highlight-colors, bondi-blue);
        }
        .attr_selector,
        .value {
            color: map-get($highlight-colors, night-rider);
        }
        .id,
        .class,
        .pseudo,
        .selector-pseudo {
            color: map-get($highlight-colors, scampi);
        }
        .tag,
        .selector-tag {
            color: map-get($highlight-colors, asparagus);
        }
    }
    // Diff
    &.diff .code {
        .chunk,
        .meta {
            color:       map-get($highlight-colors, scampi);
            font-weight: bold;
        }
        .addition {
            color:            map-get($highlight-colors, limeade);
            background-color: map-get($highlight-colors, 'honeydew');
        }
        .deletion {
            color:            map-get($highlight-colors, free-speech-red);
            background-color: map-get($highlight-colors, misty-rose);
        }
    }
    // HTTP
    &.http .code {
        .attribute,
        .attr {
            color: map-get($highlight-colors, egyptian-blue);
        }
        .literal {
            color: map-get($highlight-colors, bondi-blue);
        }
        .request {
            color: map-get($highlight-colors, cardinal);
        }
    }
    // INI
    &.ini .code {
        .title,
        .section {
            color: map-get($highlight-colors, scampi);
        }
        .setting,
        .attr {
            color: map-get($highlight-colors, cardinal);
        }
        .value,
        .keyword {
            color: map-get($highlight-colors, night-rider);
        }
    }
    // JAVA
    &.java .code {
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .javadoc {
            color: map-get($highlight-colors, pewter);
        }
        .meta,
        .annotation,
        .javadoctag {
            color: map-get($highlight-colors, cardinal);
        }
        .number {
            color: map-get($highlight-colors, bondi-blue);
        }
        .params {
            color: map-get($highlight-colors, bahama-blue);
        }
    }
    // JavaScript
    &.js .code {
        .built_in,
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .javadoc {
            color: map-get($highlight-colors, pewter);
        }
        .tag,
        .javadoctag {
            color: map-get($highlight-colors, cardinal);
        }
        .tag .title {
            color: map-get($highlight-colors, night-rider);
        }
        .regexp {
            color: map-get($highlight-colors, persimmon);
        }
        .literal,
        .number {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // JSON
    &.json .code {
        .attribute {
            color: map-get($highlight-colors, egyptian-blue);
        }
        .number,
        .literal {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // Makefile
    &.mak .code {
        .constant {
            color: map-get($highlight-colors, night-rider);
        }
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .keyword,
        .meta-keyword {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // Markdown
    &.md .code {
        .value,
        .link_label,
        .strong,
        .emphasis,
        .blockquote,
        .quote,
        .section {
            color: map-get($highlight-colors, egyptian-blue);
        }
        .link_reference,
        .symbol,
        .code {
            color: map-get($highlight-colors, bondi-blue);
        }
        .link_url,
        .link {
            text-decoration: underline;
        }
    }
    // Nginx
    &.nginx .code {
        .title,
        .attribute {
            color: map-get($highlight-colors, cardinal);
        }
        .built_in,
        .literal {
            color: map-get($highlight-colors, bondi-blue);
        }
        .regexp {
            color: map-get($highlight-colors, egyptian-blue);
        }
        .variable {
            color: map-get($highlight-colors, night-rider);
        }
    }
    // Objective-C
    &.objectivec .code {
        .preprocessor,
        .meta {
            color: map-get($highlight-colors, cardinal);

            .title {
                color: map-get($highlight-colors, persimmon);
            }
        }
        .meta-string {
            color: map-get($highlight-colors, egyptian-blue);
        }
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .literal,
        .number,
        .built_in {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // Perl
    &.perl .code {
        .sub {
            color: map-get($highlight-colors, scampi);
        }
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .regexp {
            color: map-get($highlight-colors, persimmon);
        }

    }
    // PHP
    &.php .code {
        .phpdoc,
        .doctag {
            color: map-get($highlight-colors, cardinal);
        }
        .regexp {
            color: map-get($highlight-colors, persimmon);
        }
        .literal,
        .number {
            color: map-get($highlight-colors, bondi-blue);
        }
        .title {
            color: map-get($highlight-colors, scampi);
        }
    }
    // Python
    &.python .code {
        .decorator,
        .title,
        .meta {
            color: map-get($highlight-colors, scampi);
        }
        .number {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // Ruby
    &.ruby .code {
        .parent,
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .prompt,
        .constant,
        .number,
        .subst .keyword,
        .symbol {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // SQL
    &.sql {
        .built_in {
            color: map-get($highlight-colors, cardinal);
        }
        .number {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // XML, HTML
    &.xml,
    &.html {
        .tag {
            color: map-get($highlight-colors, night-rider);
        }
        .value {
            color: map-get($highlight-colors, egyptian-blue);
        }
        .attribute,
        .attr {
            color: map-get($highlight-colors, scampi);
        }
        .title,
        .name {
            color: map-get($highlight-colors, asparagus);
        }
    }
    // Puppet
    &.puppet {
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .function {
            color: map-get($highlight-colors, bondi-blue);
        }
        .name {
            color: map-get($highlight-colors, cardinal);
        }
        .attr {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // LESS
    &.less {
        .tag,
        .at_rule {
            color: map-get($highlight-colors, cardinal);
        }
        .number,
        .hexcolor,
        .function,
        .attribute {
            color: map-get($highlight-colors, bondi-blue);
        }
        .built_in {
            color: map-get($highlight-colors, persimmon);
        }
        .id,
        .pseudo,
        .class,
        .selector-id,
        .selector-class,
        .selector-tag {
            color: map-get($highlight-colors, scampi);
        }
    }
    // Lisp
    &.lisp .code {
        .name {
            color: map-get($highlight-colors, persimmon);
        }
        .number {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // SCSS
    &.scss {
        .tag,
        .at_rule,
        .important {
            color: map-get($highlight-colors, cardinal);
        }
        .number,
        .hexcolor,
        .function,
        .attribute {
            color: map-get($highlight-colors, bondi-blue);
        }
        .variable {
            color: map-get($highlight-colors, night-rider);
        }
        .built_in {
            color: map-get($highlight-colors, persimmon);
        }
        .id,
        .pseudo,
        .class,
        .preprocessor,
        .selector-class,
        .selector-id {
            color: map-get($highlight-colors, scampi);
        }
        .tag,
        .selector-tag {
            color: map-get($highlight-colors, asparagus);
        }
    }
    // Stylus
    &.stylus {
        .at_rule {
            color: map-get($highlight-colors, cardinal);
        }
        .tag,
        .selector-tag {
            color: map-get($highlight-colors, asparagus);
        }
        .number,
        .hexcolor,
        .attribute,
        .params {
            color: map-get($highlight-colors, bondi-blue);
        }
        .class,
        .id,
        .pseudo,
        .title,
        .selector-id,
        .selector-pseudo,
        .selector-class {
            color: map-get($highlight-colors, scampi);
        }
    }
    // Go
    &.go {
        .typename {
            color: map-get($highlight-colors, cardinal);
        }
        .built_in,
        .constant {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // Swift
    &.swift {
        .preprocessor {
            color: map-get($highlight-colors, cardinal);
        }
        .title {
            color: map-get($highlight-colors, scampi);
        }
        .built_in,
        .number,
        .type {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
    // YAML
    &.yml {
        .line
        .attr {
            color: map-get($highlight-colors, asparagus);
        }
        .line,
        .string,
        .type,
        .literal,
        .meta {
            color: map-get($highlight-colors, egyptian-blue);
        }
        .number {
            color: map-get($highlight-colors, bondi-blue);
        }
    }
}
